package com.ryskoo.catering.producttemplateattr.domain;

import com.ryskoo.catering.producttemplateattrvalue.domain.ProductTemplateAttrValuePO;
import com.ryskoo.framework.core.bean.BasicPO;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

@Entity
@Table(name = "cater_product_template_attr")
public class ProductTemplateAttrPO extends BasicPO {

    /** 所属行业uuid */
    @Column(name = "industry_uuid",columnDefinition = "char",length = 32)
    private String industryUuid;

    /** 所属行业名称 */
    @Column(name = "industry_name",columnDefinition = "varchar",length = 20)
    private String industryName;

    /** 属性名称 */
    @Column(name = "name",columnDefinition = "varchar",length = 20)
    private String name;

    /** 是否是规格属性 */
    @Column(name = "is_spec")
    private boolean isSpec;

    /** 排序 */
    @Column(name = "position",columnDefinition = "int")
    private int position;

    /** 属性值集合 */
    @Transient
    private List<ProductTemplateAttrValuePO> values;

    /** 属性值，显示在列表上 */
    @Transient
    private String attrValues = "";

    public String getIndustryUuid() {
        return industryUuid;
    }

    public void setIndustryUuid(String industryUuid) {
        this.industryUuid = industryUuid;
    }

    public String getIndustryName() {
        return industryName;
    }

    public void setIndustryName(String industryName) {
        this.industryName = industryName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isSpec() {
        return isSpec;
    }

    public void setSpec(boolean spec) {
        isSpec = spec;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public List<ProductTemplateAttrValuePO> getValues() {
        return values;
    }

    public void setValues(List<ProductTemplateAttrValuePO> values) {
        this.values = values;
    }

    public String getAttrValues() {
        return attrValues;
    }

    public void setAttrValues(String attrValues) {
        this.attrValues = attrValues;
    }
}
